1. Field
The present disclosure relates generally to an electronic apparatus for effective resource management and a method of the management, and for example, to an electronic apparatus for effective resource management for allocating different kinds of resources including hardware resources and software resource, and a method of the management.
2. Description of Related Art
A computer system (or a computing system) including an Operating System (OS), or a computer system (or a computing system) including an embedded Operating System (OS) or an embedded system (hereinafter, referred to as a “system”) supports multitasking to simultaneously execute a plurality of applications. Accordingly, a technique for efficiently using limited resources of a system is required so as to support the multitasking.
In general, resources are managed in a system by separating the resources into hardware resources and software resources. For example, the hardware resources may be physical devices such as a demultiplexer, a decoder, a scaler, a tuner, etc. In addition, the software resources may be logical devices such as Open Media Acceleration (OMX), etc.
However, a system having restrictions on the hardware resources and the software resources, which are different from each other, may not efficiently manage resources with restrictions.
For example, a first application may use a first video decoder, which is a hardware resource, so as to play a video of an MPEG4 stream, and a second application may use an HDMI resource, which is a hardware resource, so as to output contents (e.g., a video) from an HDMI input source.
The first video decoder and the HDMI resource are different from each other in terms of hardware, the first and second applications may use the hardware resources thereof, respectively.
However, the first video decoder and the HDMI resource share and use a system bus, which is a software resource. When a sum of bandwidths used by each hardware resource exceeds capability of a bandwidth of the system bus provided in a system, contents provided from the first application or the second application may be cracked on a screen of an electronic apparatus.
For example, a maximum bandwidth where the first video decoder and the HDMI resource are simultaneously used on the system bus may be 900 bps (bits per second), a bandwidth of the system bus used by the first video decoder when playing the MPEG4 stream may be 300 bps, and a bandwidth of the system bus used by the HDMI resource when outputting an HMDI input source may be 700 bps. Since a sum of the bandwidths simultaneously used by two resources exceeds the capacity of the bandwidth provided by the system bus, the output video content may be distorted.
In the prior art, in order to prevent the above-described image from being distorted on the screen, resources may be managed by not executing a playing application by using one of the first video decoder or the HDMI resource. In addition, in the prior art, in response to a conflict between resources, the resources may be managed by recovering a resource, which is in use, from an application and allocating the recovered resource to another application which requests the resource.
An application loaded in a background state of a display may request a resource of an application executed on a foreground of the display. When the system of the electronic apparatus recovers the resource of the application being executed on the foreground and allocates the resource to the application loaded in the background, the application executed on the foreground may be abnormally terminated, and a black screen may occur.